<?php
declare (strict_types = 1);

namespace app\admin\request;

use app\BaseRequest;

class AdminRequest extends BaseRequest
{
    protected $rule = [
        'admin_id'      =>'require',
        'login_name'    =>'require',
        'password'      =>'require',
        'nick_name'     =>'require',
        'real_name'     => 'require',
        'mobile'        => 'require',
        'sex'           => 'require',
        'photo'         => 'require',
        'status'        => 'require',
        'is_super_admin'=> 'require',
        'login_ip'      => 'require',

        'page'          => 'require',
        'list_rows'     => 'require',
        'id'         => 'require',
    ];

    protected $message = [
        'admin_id.require'      =>'admin_id必须',
        'login_name.require'    =>'用户名必须',
        'password.require'      =>'密码必须',
        'nick_name.require'     =>'昵称必须',
        'real_name.require'     =>'真实姓名必须',
        'mobile.require'        =>'手机号必须',
        'sex.require'           =>'性别必须',
        'photo.require'         =>'头像必须',
        'status.require'        =>'状态必须',
        'is_super_admin.require'=>'是否为超级管理员必须',
        'login_ip.require'      =>'登录ip必须',

        'page.require'          =>'分页必须',
        'list_rows.require'     =>'分页数量必须',
        'id.require'         => '请求参数必须',
    ];

    protected $scene = [
        'index' => ['page','list_rows','id'],
        'data'  => ['admin_id','login_name','password','nick_name','real_name','mobile','sex','photo','status','is_super_admin','login_ip'],
    ];
}
